/*
Copyright 2010 Johan Maasing

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package nu.zoom.catonine.prefs;

import java.io.File;
import java.util.Set;

import nu.zoom.swing.desktop.common.BackendException;
import nu.zoom.swing.desktop.component.filechooser.FileChooser;
import nu.zoom.swing.desktop.preferences.InvalidDataTypeException;

/**
 * Store and retreive persistent preferences settings.
 * 
 * @author "Johan Maasing" &lt;johan@zoom.nu&gt;
 * 
 */
public interface Preferences {
	public enum WindowOpenMode {
		Detached, Attached, Rememeber
	};

	public String getPreferredUUIDForFile(final File file) throws InvalidDataTypeException, BackendException;

	public void setPreferredUUIDForFile(final File file, final String uuid) throws InvalidDataTypeException,
			BackendException;

	public boolean isGutterForFile(final File file) throws InvalidDataTypeException, BackendException;

	public void setGutterForFile(final File file, final boolean gutterVisible) throws InvalidDataTypeException,
			BackendException;

	public boolean isWrapForFile(final File file) throws InvalidDataTypeException, BackendException;

	public void setWrapForFile(final File file, final boolean wrap) throws InvalidDataTypeException, BackendException;

	public void rememeberOpenedFiles(final Set<String> filenames) throws InvalidDataTypeException, BackendException;

	public Set<String> getOpenedFiles() throws InvalidDataTypeException, BackendException;
/*
	public String getConfigurationFilename() throws InvalidDataTypeException, BackendException;

	public void setConfigurationFilename(String filename) throws InvalidDataTypeException, BackendException;
*/
	public FileChooser getConfiguratonFilechooser() throws InvalidDataTypeException, BackendException;

	public FileChooser getFilechooser() throws InvalidDataTypeException, BackendException;

	public WindowOpenMode getWindowOpenMode() throws InvalidDataTypeException, BackendException;

	public void setWindowOpenMode(WindowOpenMode value) throws InvalidDataTypeException, BackendException;

	public Integer getScrollbackSize() throws InvalidDataTypeException, BackendException;

	public void setScrollbackSize(Integer size) throws InvalidDataTypeException, BackendException;
}